Skip to content

feat(calendar): add --conference flag to +insert for Google Meet links#464

Open
anshul-garg27 wants to merge 3 commits intogoogleworkspace:mainfrom
anshul-garg27:feat/calendar-conference-flag
Open

feat(calendar): add --conference flag to +insert for Google Meet links#464
anshul-garg27 wants to merge 3 commits intogoogleworkspace:mainfrom
anshul-garg27:feat/calendar-conference-flag

Conversation

@anshul-garg27
Copy link
Contributor

Closes #419. Closes #461.

Summary

  • Add --conference flag to gws calendar +insert that auto-creates a Google Meet video conference link on the event
  • Uses the Calendar API's conferenceData.createRequest with conferenceSolutionKey.type = "hangoutsMeet" and conferenceDataVersion=1

Usage

gws calendar +insert --summary 'Team Sync' \
  --start '2026-06-17T09:00:00-07:00' \
  --end '2026-06-17T09:30:00-07:00' \
  --conference

Changes

  • Add --conference flag (boolean) to +insert command definition
  • build_insert_request(): when flag is set, inject conferenceData.createRequest with hangoutsMeet type and unique requestId
  • Set conferenceDataVersion=1 query parameter to activate conference processing
  • Update help text with --conference example
  • Add test_build_insert_request_with_conference and test_build_insert_request_without_conference

Test plan

  • cargo test — 586 passed, 0 failed
  • cargo clippy -- -D warnings — clean
  • Manual: gws calendar +insert --summary Test --start ... --end ... --conference → verify event has Meet link

Generated with Claude Code

@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2026

🦋 Changeset detected

Latest commit: 580957e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@googleworkspace/cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@googleworkspace-bot googleworkspace-bot added the area: core Core CLI parsing, commands, error handling, utilities label Mar 13, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the gws calendar +insert command by providing a convenient way to integrate Google Meet conferences directly into newly created events. This change streamlines the process of scheduling virtual meetings, eliminating the need for manual setup of conference links and improving the utility of the calendar management tool.

Highlights

  • New Feature: Introduced a --conference flag to the gws calendar +insert command, allowing users to automatically create Google Meet video conference links for new calendar events.
  • API Integration: Implemented the use of the Google Calendar API's conferenceData.createRequest with conferenceSolutionKey.type = "hangoutsMeet" and set conferenceDataVersion=1 to enable conference processing.
  • User Experience: Updated the command-line help text and examples to reflect the new --conference flag, guiding users on its usage.
  • Testing: Added new unit tests (test_build_insert_request_with_conference and test_build_insert_request_without_conference) to ensure the correct behavior of conference data generation based on the flag.
Changelog
  • src/helpers/calendar.rs
    • Added the --conference argument definition to the +insert subcommand.
    • Modified the build_insert_request function to detect the --conference flag.
    • Implemented logic within build_insert_request to construct the conferenceData JSON payload with a unique requestId and hangoutsMeet type when the --conference flag is present.
    • Set the conferenceDataVersion=1 parameter in the API request when a conference is requested.
    • Updated the after_help text for the +insert command to include an example and tip for the new --conference flag.
    • Added test_build_insert_request_with_conference to verify correct conference data generation.
    • Added test_build_insert_request_without_conference to confirm no conference data is generated when the flag is absent.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a --conference flag to the gws calendar +insert command, which automatically adds a Google Meet link to the created event. The implementation correctly modifies the +insert command definition, updates the build_insert_request function to construct the necessary conferenceData in the request body, and adds the conferenceDataVersion=1 query parameter as required by the Google Calendar API. The changes are well-tested with new unit tests covering both cases where the flag is present and absent. The code is clean, follows existing patterns, and the help text is updated appropriately. I have not found any issues of high or critical severity.

@anshul-garg27
Copy link
Contributor Author

Ready for review — all tests passing, Gemini feedback addressed. @jpoehnelt

Closes googleworkspace#419. Closes googleworkspace#461.

Add --conference flag to `gws calendar +insert` that attaches a Google
Meet video conference link to the newly created event.

Implementation:
- Add conferenceData.createRequest with type "hangoutsMeet" to the
  event body when --conference is set
- Set conferenceDataVersion=1 query parameter so the Calendar API
  processes the conference creation request
- Generate a unique requestId (gws-<random hex>) for idempotency

Add tests for both --conference and no-conference paths.
@anshul-garg27 anshul-garg27 force-pushed the feat/calendar-conference-flag branch from d7f5edc to 6a4b9be Compare March 13, 2026 20:18
@googleworkspace-bot
Copy link
Collaborator

/gemini review

@googleworkspace-bot
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a --conference flag to the gws calendar +insert command to automatically create a Google Meet link for a new event. The implementation correctly updates the command-line argument parsing, modifies the request building logic to include conferenceData in the body and conferenceDataVersion=1 in the parameters when the flag is present, and adds corresponding unit tests. The changes appear correct and are well-contained. I have not found any high or critical severity issues in this pull request.

@googleworkspace-bot
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a --conference flag to the gws calendar +insert command, allowing for the automatic creation of a Google Meet link for new events. The implementation correctly modifies the command-line arguments, constructs the necessary API request body and parameters, and includes comprehensive tests for both the positive and negative cases.

My review includes one suggestion to enhance the uniqueness of the conference requestId by using the uuid crate instead of rand::random(), which is a more robust and standard practice for this purpose.


if conference {
// Generate a unique requestId for the conference creation
let request_id = format!("gws-{:016x}", rand::random::<u64>());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

For improved robustness in generating a unique requestId, consider using the uuid crate. It's the standard for generating unique identifiers in Rust and provides stronger uniqueness guarantees than a random u64, virtually eliminating the chance of collisions, which could otherwise lead to failed event creations.

If the uuid crate is available as a dependency (with the v4 feature), you could update the requestId generation as follows to keep the gws- prefix and pass the existing tests:

Suggested change
let request_id = format!("gws-{:016x}", rand::random::<u64>());
let request_id = format!("gws-{}", uuid::Uuid::new_v4());

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uuid would be more robust but it adds a new dependency for something that only needs to be unique per-request. the random u64 with gws- prefix is the same pattern google's own calendar clients use. happy to switch if maintainer prefers though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Core CLI parsing, commands, error handling, utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calendar event is created without Hangout Feature: Add video conferencing to meeting insert

2 participants